package com.danskin.wechat.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.danskin.wechat.entity.WxMessageNews;

public interface WxMessageNewsDao {

	public Integer save(WxMessageNews wxMessageNews);

	/**
	 * 根据ID查询对象
	 * 
	 * @param Id
	 * @return
	 */
	public WxMessageNews selectWxMessageNewsById(Integer primeKey);

	/**
	 * 根据查询对象和分页条件，查询平台用户list
	 * 
	 * @param wxMessageNews
	 * @return
	 */
	public List<WxMessageNews> selectWxMessageNewsPageList(@Param("wxMessageNews") WxMessageNews wxMessageNews,
			@Param("offset") int offset, @Param("limit") int limit);

	/**
	 * 根据查询对象和分页条件，查询平台用户list
	 * 
	 * @param wxMessageNews
	 * @return
	 */
	public List<WxMessageNews> selectWxMessageNewsList(WxMessageNews wxMessageNews);

	public List<WxMessageNews> selectByMessageId(@Param("messageId") Integer messageId);

	/**
	 * 根据查询对象查询总数
	 * 
	 * @param wxMessageNews
	 * @return
	 */
	public int selectWxMessageNewsPageCount(WxMessageNews wxMessageNews);

	/**
	 * 新增
	 * 
	 * @param wxMessageNews
	 * @return
	 */
	public int insertSelective(WxMessageNews wxMessageNews);

	public int insertBatch(List<WxMessageNews> list);

	/**
	 * 更新用户
	 * 
	 * @param wxMessageNews
	 */
	public int updateByPrimaryKeySelective(WxMessageNews wxMessageNews);

	/**
	 * 根据用户id删除user
	 * 
	 * @param id
	 */
	public int deleteWxMessageNewsById(Integer primeKey);

	public int deleteByMessageId(@Param("messageId") Integer messageId);

}
